home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / VGADOC4B.ZIP / AVANCE.TXT < prev    next >
Text File  |  1995-09-29  |  16KB  |  397 lines

  1. Avance Logic ALG Graphics Accelerator
  2.  
  3. The ALG chips are VGA controllers with built in graphics coprocessor (COP).
  4. The ALG chips only works in AT and better systems as they uses 16 bit I/O
  5.  addresses.
  6.  
  7. ALG2101  160pin  2Mb, 1280x1024x256c, 800x600x64k
  8. ALG2201  160pin  As 2101, but supports 24bit color
  9. ALG2228  160pin  2MB, 1280x1024x256c, 1024x768x32k/64k, 800x600x16m
  10. ALG2301  160pin  PCI version of ALG2228
  11. ALG2302
  12. ALG2064  64bit memory bus, integrates 24bit DAC & dual clock generator and
  13.          on-chip 32K ROM
  14.  
  15.  
  16. Support chips:
  17.  
  18.  
  19. ALG1101   16bit DAC, controlled via I/O pin
  20. ALG1201   15/16/24bit DAC
  21. ALG1301   As 1201, but with video functions
  22. ALG3102   Clock chip. Supplies 50.35, 56.6, 44.6, 72.2, 74.9, 65.1, 84.7,
  23.                   79.4, 25.175, 28.3, 44.6, 36.1, 57.1, 63.3, 49.9, 39.7
  24.  
  25.  
  26. 3C0h index 15h (R/W):  Cursor Foreground
  27. bit  0-7  The HW cursor foreground color
  28.  
  29. 3C0h index 16h (R/W):  Cursor Background
  30. bit  0-7  The HW cursor background color
  31. Note: When updating index 15h and 16h it may be necessary to explicitly
  32.       preserve index 11h and 12h.
  33.  
  34. 3CEh index 09h (R/W):  Planar Pixel Index Register
  35. bit  0-2  Planar Pixel Index. Selects the pixel within the CPU Latch to be
  36.           read at 3CEh index 0Ah.
  37.  
  38. 3CEh index 0Ah (R/W):  Planar Pixel Register
  39. bit  0-3  Planar Pixel Data. A planar pixel can be read by:
  40.             Reading the video memory address containing the pixel, thus
  41.             loading the CPU latches.
  42.             Setting index 9 to the pixel number (0-7) within the byte.
  43.             Reading this register.
  44.  
  45. 3CEh index 0Bh (R/W):  Extended Function Register 1
  46. bit  0-1  Video Clock Division Control. Divides the video clock by:
  47.             (2101) 0: pass through, 1: 1.5, 2: 2, 3: 4
  48.             (2228) 0: pass through, 1: 2, 2: 4, 3: 4
  49.        2  DRAM Clock Select. If set the DRAM clock is selected from the video
  50.           clocks, if clear from SCLK. Only valid if 3CEh index 0Ch bit 6 is
  51.           set.
  52.      3-5  ??
  53.      6-7  DRAM Clock Division Control. Divides the DRAM clock by:
  54.             0: pass through, 1: 1.5, 2: 2, 3: 4
  55.  
  56. 3CEh index 0Ch (R/W):  Extended Function Register 2
  57. bit    0  Vertical Retrace Interrupt Polarity Control. If set the Vertical
  58.           Retrace Interrupt is active low, if clear active high.
  59.        1  16-bit Video Memory Access Enable. Set if access to video memory is
  60.           8bit, clear if 16bit.
  61.        2  16-bit BIOS ROM Access Enable. Set if access to the BIOS ROM is
  62.           8bit, clear if 16bit.
  63.        3  Building Character. If set enables patterned writes where the CPU
  64.           data is interpreted as a pattern (Color Expansion). 8 pixels are
  65.           written at a time. '1' bits in the pattern cause the pixel to be set
  66.           to the foreground color (3CEh index 0Dh) and '0' bits the background
  67.           color (3CEh index 0Eh).
  68.        4  8Maps Enable. (Packed modes only) If set 8maps are chained together
  69.           rather than the normal 4 (Chain4). If set the Display Start Address
  70.           (3d4h index Ch-Dh + 20h) and the Offset (3D4h index 13h) are in
  71.           units of 8 bytes. If clear in units of 4 bytes and the pixels are
  72.           doubled on the screen (Mode 13h).
  73.        5  Clock Select 2. Bits 0-1 are in 3C2h/3CCh bits 2-3
  74.        6  SCLK Selection Enable. If set enables 3CEh index 0Bh bit 2
  75.        7  If set turns display off ?
  76.  
  77. 3CEh index 0Dh (R/W):  Foreground Color Register
  78. bit  0-7  Used as foreground color in Color Expansion and fill color by the
  79.           Coprocessor. In planar modes only bits 0-3 are used.
  80.  
  81. 3CEh index 0Eh (R(W):  Background Color Register
  82. bit  0-7  Used as foreground color in Color Expansion and by the Coprocessor.
  83.           In planar modes only bits 0-3 are used.
  84.  
  85. 3CEh index 0Fh (R/W):  Extended Function Register 3
  86. bit    0  Polarity Control of CPU Latch Output to Function Block. If set the
  87.           output from the CPU Latch is inverted.
  88.        1  Polarity Control of Function Block output to Bit Mask Block. If set
  89.           the output from the Function Block is inverted
  90.        2  Set to enable the Read bank.
  91.        3  Address Mapping Control. If set 1MB of video memory can be mapped to
  92.           any 1MB bank in the first 16MB ?
  93.        4  ??
  94.        5  (2201 +)
  95.      6-7  ??
  96.  
  97. 3CEh index 10h (R/W):                                                   (2201+)
  98. bit  0-7  ??
  99.  
  100. 3CEh index 11h (R/W):                                                   (2201+)
  101. bit  0-7  ??
  102.  
  103. 3CEh index 1Fh (R/W):  Character ROM Extended Address Register           (2101)
  104. bit  0-1  ??
  105.        2  (2101 only) Clock Select 3. Bits 0-1 are in 3C2h/3CCh bits 2-3 and
  106.             bit 2 in 3CEh index 0Ch bit 6
  107.      3-7  ??
  108.  
  109. 3d4h index 19h (R/W):  CRTC Extended Registers 1
  110. bit    0  Interlace Control. Set in interlaced modes. In interlaced modes the
  111.           CRTC offset (3d4h index 13h) is for two scan lines.
  112.        1  High Resolution Address Support in Chain 4 Mode. If set MA14 and
  113.           MA15 wraps around, if clear MA12 and MA13 wraps around.
  114.           Should be set enables access to video memory above 256K.
  115.        2  Clock Lock. If set disables writes to 3C2h bits 2,3,6,7.
  116.        3  CRTC Timing Lock. If set disables writes to the CRTC timing
  117.           registers.
  118.        4  New Address Scheme. If set the CRTC uses non-wrapped addresses and
  119.           shifts them 0-2 bits left depending on sequencer mode.
  120.           SEt in HiColor modes, but does not controll the DAC mode.
  121.        5  Vertical Retrace Edge Control to load line address
  122.        6  VREB4. Bit 4 of the Vertical Retrace End Register (3d4h index 11h
  123.           bits 0-3). Only valid if bit 7 set.
  124.        7  VRC4EN. If set the Vertical Retrace Register (3d4h index 11h bits
  125.           0-3) is extended with bit 6 of this register.
  126. Note: This register can only be written when 3d4h index 1Ah bit 4 is set
  127.  
  128. 3d4h index 1Ah (R/W):  CRTC Extended Register 2
  129. bit    0  6845 Emulation Mode. If set forces the CRTC to 6845 mode.
  130.        1  EGA Emulation Mode. If set emulates the IBM EGA CRTC. Causes display
  131.           to wrap at 512K ?
  132.        2  (2228) Enable hardware cursor if set
  133.        4  Protect Hardware Configuration. If clear disables writes to 3d4h
  134.           index 19h, 1Dh and 3CEh index 0Bh and 0Fh. If set enables access to
  135.           all extended registers
  136.        5  If set causes color shifts ?
  137.      6-7  (R) Version Number. 1: ALG2201, 3: ALG2101, 2: ALG2228/ALG2301
  138.  
  139. 3d4h index 1Bh (R):  Configuration Register 1
  140. bits 0-7  Reserved.
  141.        2  Set for the ALG2228, clear for the ALG2201 & ALG2301 (this could
  142.           also be a bus ID (set for VESA, clear for PCI) or similar ??)
  143.  
  144. 3d4h index 1Ch (R/W):  Configuration Register 2
  145. bit    0  DRAM Configuration. 0: 4 256Kx4 (512K), 1: 8/16 256Kx4
  146.        1  Data Buffer Configuration. If clear the data bus is buffered with a
  147.           74LS245 (or similar), if set it is unbuffered.
  148.        2  3C3h/46E8h Select. If set the VGA Enable Port is at 3C3h, if clear
  149.           at 46E8h.
  150.        3  BIOS ROM Access Enabled if set
  151.        4  Reserved (0=MCA bus, 1=ISA bus)?
  152.        5  ROM Type. 0: 27128 (16K) ROM, 1: 27256 (32K) ROM.
  153.        7  -MCS16 Decoding Control. If set -MCS16 is decoded from LA17-23, if
  154.           clear from SA16-19
  155. Note: The contents of this register are latched from M02D0-7 on the falling
  156.       edge of the RESET signal.
  157.  
  158. 3d4h index 1Dh (R/W):  Configuration Register 3
  159.        0  Address Latch Enable. If set the address lines are latched
  160.           internally on the falling edge of ALE, if clear the internal latch
  161.           is transparent.
  162.        1  Write-per-bit. If set forces the Sequencer to support DRAM write-
  163.           per-bit operaton ?
  164.        3  Clock Select Pin Putput Enable. If set VCLK1, VCLK2 and VCLK3 are
  165.           output pins, if clear input pins.
  166.        4  Output Enable. If set enables all output pins, if clear all output
  167.           pins except -DATAENL, DIR, -DATAENH, RAS; CKS0, CKS1 and CKS2 are
  168.           tristated.
  169.        5  Slot Size Detection. Set if the slot is 16bit, clear if 8bit.
  170.        6  External Video. If set enables the P0-7, BLANK, PCLK, HSYNC and
  171.           VSYNC pins for video output, if clear tristates them.
  172. Note: The contents of this register are latched from M1D0-7 on the falling
  173.       edge of the RESET signal.
  174. Note: This register can only be written when 3d4h index 1Ah bit 4 is set
  175.  
  176. 3d4h index 1Eh (R/W):
  177. bit  0-1  Video memory. 0=256k, 1=512k, 2=1M, 3=2Mbytes.
  178.      6-7  Max Horizontal Frequency:  0=38kHz, 1=48kHz, 2=56kHz, 3=64kHz.
  179.  
  180. 3d4h index 1Fh (R/W):
  181. bit  0-1  Emulation. 0=VGA, 1=EGA, 2=CGA,3=MDA
  182.  
  183. 3d4h index 20h (R/W):
  184. bit  0-2  Display start address bit 16-18.
  185. Note: if 3CEh index Ch bit 4 is set, the display start is in units of 8 bytes,
  186.       rather than 4 as in std vga.
  187.  
  188. 3d4h index 21h (R/W):  Cursor X position
  189. bit  0-7  Bits 3-10 of the HW cursor X position. The lower bits are in index
  190.           25h.
  191.  
  192. 3d4h index 23h (R/W):  Cursor Y position
  193. bit  0-7  Bits 1-8 of the HW cursor Y position. The upper bits are in index
  194.           25h.
  195. Note: in non-interlaced modes (3d4h index 19h bit 0 is 0) the Y co-ordinate
  196.       should be multiplied by 2.
  197.  
  198. 3d4h index 25h (R/W):  Cursor control
  199. bit  0-1  Bit 9-10 of the HW cursor Y position. The lower bits are in index
  200.           23h
  201.      2-4  Bits 0-2 of the HW cursor X position. The upper bits are in index
  202.           21h
  203.        5  If set enables the HW cursor. To preserve the stability of the
  204.           cursor, this bit should be set with each update of this register.
  205.        6  Bit 0 of the HW cursor Y position. (see note on interlace).
  206.  
  207. 3d4h index 27h W(R/W):  Cursor Map address
  208. bit 0-10  The address in video memory where the HW cursor map starts.
  209.           In planar modes this address is in units of 256 bytes,
  210.           in packed modes in units of 1024 bytes.
  211.           The HW cursor is a 64x64 bitmap imposed on the display.
  212.           The cursor map is stored as a 64x64x2bit array, where each pixel is:
  213.              0: Background color (3C0h index 16h)
  214.              1: Foreground color (3C0h index 15h)
  215.              2: The screen data (transparent cursor).
  216.              3: Inverted screen data (XOR cursor)
  217. Note: in interlaced modes the cursor is shown double height.
  218.  
  219. 3d4h index 28h (R/W):  Vertical Extended reg
  220. bit    7  CRTC Offset bit 8. Bits 0-7 are in 3d4h index 13h
  221. Note: The extensions of the CRTC registers in this register are only
  222.       active if 3d4h index 19h bit 7 is set.
  223.  
  224. 3d4h index 2Ah (R/W):  Horizontal Extended reg                      (2201 +)
  225. bit    0  Horizontal Total bit 8. Bits 0-7 are in 3d4h index 00h
  226.        3  Horizontal Blanking ??.
  227.        4  ??
  228.        5  ??
  229. Note: The extensions of the CRTC registers in this register are only active
  230.       if 3d4h index 19h bit 7 is set.
  231.  
  232. 3D6h (R/W):  Read Address Register
  233. bit  0-4  64k Read bank number. If 3CEh index Fh bit 2 is set all reads use
  234.           this bank number, if clear all accesses use 3D7h.
  235.  
  236. 3D7h (R/W):  Read/Write Address Register
  237. bit  0-4  64k Bank number. If 3CEh index Fh bit 2 is clear all accesses use
  238.           this bank number, if set writes use this bank and reads use 3D6h.
  239.  
  240. 8280h W(R/W): Source address low
  241. bit 0-15  The lower 16 bits of the pixel address of the source area.
  242.  
  243. 8282h (R/W): Source address high
  244. bit  0-7  The upper 8 bits of the pixel address of the source area.
  245.           Calculated as (line no.)*(pixels per line)+(pixel no. in line).
  246.  
  247. 8284h W(R/W): Source area scanline width.
  248. bit 0-15  The number of pixels in a scanline at the source.
  249.  
  250. 8286h W(R/W): Destination address low.
  251. bit 0-15  Lower 16 bits of the pixel address of the destination area.
  252.  
  253. 8288h (R/W): Destination Address high.
  254. bit  0-7  The upper 8 bits of the pixel address of the destination area.
  255.           Calculated as (line no.)*(pixels per line)+(pixel no. in line).
  256.  
  257. 828Ah W(R/W): Destination area scanline width
  258. bit 0-15  Number of pixels in a scanline at the destination.
  259.  
  260. 828Ch W(R/W): Width of op.
  261. bit 0-15  Width of the blit area in pixels.
  262.  
  263. 828Eh W(R/W): Height of op.
  264. bit 0-15  Number of lines in the blit area.
  265.  
  266. 8290h (R/W):
  267. bit  0-5  7 If moving towards higher co-ordinates, 1 if moving towards lower.
  268.           0 (or don't care) for line draws
  269.        6  If set drawing only happens within the rectangle defined by
  270.           8294h-9Ah.
  271.           X co-ordinate must be >= 8294h and <=8296h.
  272.           Y co-ordinate must be >= 8298h and <=829Ah.
  273.  
  274. 8292h W(R/W):
  275. bit  0-7  always 0Dh ???
  276.        8  (Line Draw) If set the final position is to the left of the start
  277.        9  (Line Draw) If set the final position is above the start
  278.       10  (Line Draw) If set (Delta X) and (Delta Y) are swapped when
  279.           calculating the Bresenham constants in 82A2h-A6h.
  280.       11  ??
  281.       12  Set if moving towards lower co-ordinates, clear if not.
  282.  
  283. 8294h W(R/W):  Clipping left
  284. bit 0-15  If 8290h bit 6 is set drawing only happens if the X-co-ordinate is
  285.            >= this value
  286.  
  287. 8296h W(R/W):  Clipping right
  288. bit 0-15  If 8290h bit 6 is set drawing only happens if the X-co-ordinate is
  289.            <= this value
  290.  
  291. 8298h W(R/W):  Clipping top
  292. bit 0-15  If 8290h bit 6 is set drawing only happens if the Y-co-ordinate is
  293.            >= this value
  294.  
  295. 829Ah W(R/W):  Clipping bottom
  296. bit 0-15  If 8290h bit 6 is set drawing only happens if the Y-co-ordinate is
  297.            <= this value
  298.  
  299. 829Ch W(R/W): Start X co-ordinate
  300. bit 0-15  Starting X co-ordinate of the destination area.
  301.  
  302. 829Eh W(R/W): Start Y co-ordinate
  303. bit 0-15  Starting Y co-ordinate of the destination area
  304.  
  305. 82A0h W(R/W):
  306. bit 0-15  Always set to 0 ??
  307.  
  308. 82A2h W(R/W):  Bresenham Constant 1
  309. bit 0-15  The Bresenham Constant 1 used for line drawing
  310.           Calculated as  2*(Delta Y). If 8292h bit 10 is set 2*(Delta X) is
  311.           used.
  312.  
  313. 82A4h W(R/W):  Bresenham Constant 2
  314. bit 0-15  The Bresenham Constant 2 used for line drawing
  315.           Calculated as  2*((Delta Y) - (Delta X)). If 8292h bit 10 is set
  316.           (Delta Y) and (Delta X) are swapped in the calculation.
  317.  
  318. 82A6h W(R/W):  Bresenham Error Term
  319. bit 0-15  The Bresenham Error Term used for line drawing.
  320.           Calculated as  2*(Delta Y) + (Delta X). If 8292h bit 10 is set
  321.           (Delta Y) and (Delta X) are swapped in the calculation.
  322.  
  323. 82A8h W(R/W):
  324. bit 0-15  (Line draw) Pattern mask. Only the set bits are drawn.
  325.  
  326. 82AAh (R/W): COP status/instruction
  327. bit  0-3  (R) When 0 the COP is free.
  328.      0-7  (W) Graphics instruction:
  329.                1: Fill rectangle
  330.                2: Copy rectangle
  331.                4: ?
  332.                8: Line draw
  333.  
  334. 82B0h
  335.  
  336. 82BAh (R):  Status??
  337. bit    7  Set if busy ?
  338.  
  339. 82BCh
  340.  
  341. 82C0h
  342.  
  343. 82C8h W(R/W):
  344. bit
  345.  
  346. 82CAh W(R/W):
  347. 82CCh W(R/W):
  348.  
  349.  
  350.  
  351.  
  352. ID Avance Logic chip:
  353.  
  354.   old:=rdinx($3d4,$1A);
  355.   clrinx($3d4,$1A,$10);            {Disable extensions}
  356.   if not testinx($3d4,$19) then
  357.   begin
  358.     setinx($3d4,$1A,$10);          {Enable extensions}
  359.     if testinx($3d4,$19) and testinx2($3d4,$1A,$3F) then
  360.        Avance Logic AL2101 !!
  361.   end;
  362.   wrinx($3d4,$1A,old);
  363.  
  364.  
  365.  
  366.   Video modes:
  367.  
  368.     20h  T   132   25  16
  369.     21h  T   132   30  16
  370.     22h  T   132   43  16
  371.     23h  T   132   60  16
  372.     24h  T    80   30  16
  373.     25h  T    80   43  16
  374.     26h  T    80   60  16
  375.     27h  G   960  720  16  PL4
  376.     28h  G   512  512 256  P8
  377.     29h  G   640  400 256  P8
  378.     2Ah  G   640  480 256  P8
  379.     2Bh  G   800  600  16  PL4
  380.     2Ch  G   800  600 256  P8
  381.     2Dh  G   768 1024  16  Pl4
  382.     2Eh  G   768 1024 256  P8
  383.     2Fh  G  1024  768   4
  384.     30h  G  1024  768  16  PL4
  385.     31h  G  1024  768 256  P8
  386.     33h  G  1024 1024 256  P8
  387.     36h  G  1280 1024  16  PL4
  388.     37h  G  1280 1024 256  P8
  389.     40h  G   320  200 64k  P16
  390.     41h  G   512  512 64k  P16
  391.     42h  G   640  400 64k  P16
  392.     43h  G   640  480 64k  P16
  393.     44h  G   800  600 64k  P16
  394.     45h  G  1024  768 64k  P16
  395.     48h  G   640  480 16m  P24
  396.     49h  G   800  600 16m  P24
  397.